home *** CD-ROM | disk | FTP | other *** search
- --= WID = SIMTEL20 Ada Software Repository Item Description File = WID =--
- -- WIS TOOL NUMBER : WIS_TOOL_32
- -- LOCATION : ASR
- -- CATEGORY LEVEL 1 : Components
- -- CATEGORY LEVEL 2 : Count Ada Statements
- -- CATEGORY LEVEL 3 : Count of Ada Statements 1
- -- CATEGORY LEVEL 4 :
- -- INDEX : Count Ada Statements
- -- INDEX : Statements
- -- INDEX : Statements, Ada
- -- TAXONOMY : !Design, Implementation and Test!Design Analysis!Count Ada Statements Program
- -- DEPENDENCIES :
- -- SEE ALSO :
- --= ABSTRACT ===============================================--
- -- 1. TOOL NAME : CAS Ada Statement Counter
- -- 2. TOOL NUMBER : 32-1
- --
- -- 3. CONTRACTOR :
- -- 3a CONTRACT # : Not Applicable
- -- 3b NAME : WIS JPMO
- -- 3c LOCATION : Washington D.C.
- -- 203306600
- -- 3d POC : Major Terry Courtwright
- -- (703)285-5065
- --
- -- 4. TOOL DESCRIPTION :
- -- This function calculates the "STATEMENTS" of a valid Ada fragment
- -- specified by a FILE_NAME string parameter.
- -- It need not be a complete compilation unit
- -- but it should have closed all open parentheses and string brackets.
- -- The number of STATEMENTS of code is returned as an INTEGER.
- --
- -- The Ada statement is defined by a semicolon terminator
- -- outside of comments, parentheses, or string or character literals.
- -- This definition is insensitive to formatting or layout of the source.
- --
- -- There are exotic cases for which this will misestimate the count
- -- but we have never encountered one in real code.
- --
- -- This copy of the function is embedded in a test and driver program.
- -- Running the program on its own source file should give
- -- The driver has an additional feature of correcting for the common
- -- error of leaving out the extension on a file name.
- -- The nature of this extension is system dependent and a "TXT" is used.
- --
- -- function COUNT_OF_ADA_STATEMENTS (FILE_NAME : STRING) return INTEGER
- -- -- calculates the "STATEMENTS" in an Ada fragment speced by FILE_NAME.
- -- -- This copy of the function is embedded in a test and driver program.
- -- -- Running the CAS program on its own source file should give
- -- --
- -- --COUNT_OF_ADA_STATEMENTS:
- -- --Input file name terminated by <RETURN> => CAS.TXT
- -- -- 59 ADA STATEMENTS IN FILE CAS.TXT
- -- --
- -- -- The driver has an additional feature of correcting for the common
- -- -- error of leaving out the extension on a file name.
- -- -- The nature of this extension is system dependent; a "TXT" is used.
- --
- -- 5. SCHEDULE :
- -- 5a PDR/CDR :
- -- 5b DELIVERY : Available
- -- 5c DISTRIBUTION : 12 August 1985 GTE, IBM, NOSC, SIMTEL20
- --
- -- 6. CHARACTERISTICS :
- -- 6a DEVELOPMENT APPROACH : Code in Ada
- -- 6b HOST MACHINE : VAX, Intellimac, WICAT
- -- 6c OPERATING SYSTEM : ROS
- -- 6d COMPILER : Telesoft 1.3 (unvalidated)
- -- 6e DEPENDENCIES :
- -- 6f NUMBER OF STATEMENTS : 54
- --
- -- 7. DOCUMENTATION : Source comments only
- -- 8. PORTABILITY : The code is nearly machine independent. It has been
- -- ported across at least three machines (ROS with
- -- Telesoft 1.3 (unval), VMS with DEC Ada and UNIX).
- -- Port time has shown to be 1 to 2 hours.
- -- compiled, executed, 1 modification
- --
- -- 9. WIS USE :
- -- 9a FOUNDATION AREA : Design Analysis
- -- 9b WIS USE AREA : Design, Implementation and Test
- -- 10. COMMENTS :
- -- 11. LAST CHANGE TO DATA : 21 March 1986.
- --= FILE LISTING ===============================================--
- -- FILE SPECS : PD:<ADA.COMPONENTS>COUNT*.*
- -- DIRECTORY DISPLAY :
- -- Directory PD:<ADA.COMPONENTS>
- -- File Name Byte Count Line Count
- -- --------------- ---------- ----------
- -- COUNTADA.CMM 1217 33
- -- COUNTADA.PRO 4168 84
- -- COUNTADA.SRC 4587 135
- -- =============== ========== ==========
- -- 3 Files 9972 252
- --= DISCLAIMER ===============================================--
- -- This software and its documentation are provided "AS IS" and
- -- without any expressed or implied warranties whatsoever. No warranties
- -- as to performance, merchantability, or fitness for a particular
- -- purpose exist.
- -- The user is advised to test the software thoroughly before
- -- relying on it. The user must assume the entire risk and liability of
- -- using this software. In no event shall any person or organization of
- -- people be held responsible for any direct, indirect, consequential or
- -- inconsequential damages or lost profits.
- --======================================================================--
-